import MUtil from 'util/mm.jsx'
const __mm=new MUtil();

class Order{
    //获取商品列表
    getOrderList(listParam){
        let url='',
            data={};
        if(listParam.listType === 'list'){
            url='/manage/order/list.do';
            data.pageNum=listParam.pageNum;
        }else if(listParam.listType === 'search'){
            url='/manage/order/search.do';
            data.pageNum=listParam.pageNum;
            data.orderNo=listParam.orderNo;
        }

        return __mm.request({
            url:url,
            type:'post',
            data:data
        })
    }
    //订单详情
    getOrderDetail(orderNumber){
        return __mm.request({
            url:'/manage/order/detail.do',
            type:'post',
            data:{
                orderNo:orderNumber
            }
        })
    }
    sendGoods(orderNumber){
        return __mm.request({
            url:'/manage/order/send_goods.do',
            type:'post',
            data:{
                orderNo:orderNumber
            }
        })
    }
}

export default Order;